from urllib.parse import quote_plus

import pandas as pd
from sqlalchemy import create_engine


def mysql_config():
    user = 'root'
    password = quote_plus('Jison0820')
    # passwd ='merchantsasd123!@%&'
    host = 'rm-bp1be6s3581xp13rfco.mysql.rds.aliyuncs.com'
    # port1 ='3306'
    dbname2 = 'data-warehouse'
    engine2 = create_engine(f"mysql+pymysql://{user}:{password}@{host}:3306/{dbname2}?charset=utf8mb4")
    return engine2

data = pd.read_sql("select * from dy_user_info where dy_spider_user_id='{}'".format('111111'),mysql_config())
if data.empty:
    print("哈哈哈")
else:
    print("shabi ")